﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QLKS
{
    public partial class DSNV : Form
    {
        public Mysql qmysql = new Mysql();
        public DSNV()
        {
            InitializeComponent();
            string cmdText = "SELECT ht_phong.MaP, ht_loaiphong.TenLP, ht_phong.TenP From ht_phong, ht_loaiphong WHERE ht_phong.MaLP=ht_loaiphong.MaLP";
            Dictionary<string, string> Params = new Dictionary<string, string>();
            DataTable GetAllRoom = qmysql.SelectReaderSqlCommandDatatable(cmdText, Params);
            dataGridView1.DataSource = GetAllRoom;
            string result;


            result = GetAllRoom.Rows[0][1].ToString() +" "+ GetAllRoom.Rows[0][2].ToString();
           // string Array = GetAllRoom.Rows[0].ToString();
           //// MessageBox.Show(Array.ToString());
               textBox1.Text = result;
        }
    }
}
